﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <link href="~/lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <link href="~/lib/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
    <link href="~/lib/ligerUI/skins/Gray/css/all.css" rel="stylesheet" type="text/css" />
    <link href="~/Content/css/common.css" rel="stylesheet" type="text/css" />
    <script src="~/lib/jquery/jquery-1.9.0.min.js" type="text/javascript"></script>
    <script src="~/lib/ligerUI/js/ligerui.all.js"></script>
    <title></title>
    <script>
        function save() {
            var dialog = frameElement.dialog;
            var adverseEventInfo = "";
            adverseEventInfo = parent.save(dialog.get('data').oldStatus, 1);

            $.ajax({
                url: "/AdverseEvent/AdverseEventReview/ReviewSave",
                type: "post",
                data: {
                    id: dialog.get('data').id,
                    status: dialog.get('data').status,
                    oldStatus: dialog.get('data').oldStatus,
                    duDaoRemark: dialog.get('data').duDaoRemark,
                    reviewReason: $("#txtReviewReason").val(),
                    yuHou: dialog.get('data').yuHou,
                    zhuanGui: dialog.get('data').zhuanGui,
                    adverseEventInfo: adverseEventInfo
                },
                success: function (r) {
                    var r = $.parseJSON(r);
                    if (r.Result == 1) {
                        $.ligerDialog.success("审核成功");
                        setTimeout(function () { parent.$(".l-dialog-btn-inner").click(); }, 1000);
                    }
                    else if (r.Result == 0) {
                        $.ligerDialog.error(r.Body);
                    }
                    else {
                        $.ligerDialog.error("程序错误");
                    }
                }
            });
        }
        function closeDialog() {
            frameElement.dialog.close();//关闭dialog
        }
    </script>
</head>
<body>
    <div style="text-align:center; margin:10px 0px;">
        <textarea id="txtReviewReason" cols="55" rows="9" class="l-textarea" maxlength="500" style="padding:5px;"></textarea>
        <div style="padding-top:10px;">
            <input id="btnSubmit" type="button" value="确定" class="l-button" onclick="save()" />&nbsp;&nbsp;&nbsp;
            <input id="btnCancel" type="button" value="取消" class="l-button-cancel" onclick="closeDialog()" />
        </div>
    </div>
</body>
</html>
